package easy

import (
	"os"
	"runtime"
	"strings"
)

func IsDockerContainer() bool {
	if runtime.GOOS != "windows" {
		data, err := os.ReadFile("/proc/self/cgroup")
		if err == nil {
			if strings.Contains(string(data), "docker") {
				return true
			}
		}
	}
	return false
}
